//
//  AudioTableViewCell.m
//  PhoenixNews
//
//  Created by dllo on 16/1/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AudioTableViewCell.h"

#define WIDTH self.bounds.size.width
#define HEIGHT self.bounds.size.height
@implementation AudioTableViewCell
- (void)dealloc {
    [_playerView release];
    
    [_ViedoUrl release];
    [_VideoImage release];
    
    [super dealloc];
}



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 播放试图
        self.playerView = [[UIView alloc] init];
        self.playerView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_playerView];
        [_playerView release];
        
        
                // 视频图片
        self.VideoImage = [[UIImageView alloc] init];
        [self.playerView addSubview:_VideoImage];
        [_VideoImage release];
        
        // 封面button按钮
        self.buttonImage = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.VideoImage addSubview:_buttonImage];
        
        
       
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    // 试图View
    _playerView.frame = CGRectMake(20, 20, self.frame.size.width - 40, 300);
    
   
    // 视频图片
    _VideoImage.frame = CGRectMake(0, 0, self.playerView.frame.size.width , 300);
    // 图片上的Buton
    _buttonImage.frame = CGRectMake(150, 120, 50, 50);
    
   
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
